package cn.csc.module.distribute.service.withdraw;

import cn.csc.framework.common.pojo.PageResult;
import cn.csc.module.distribute.controller.admin.withdraw.vo.DistributeWithdrawCreateReqVO;
import cn.csc.module.distribute.controller.admin.withdraw.vo.DistributeWithdrawExportReqVO;
import cn.csc.module.distribute.controller.admin.withdraw.vo.DistributeWithdrawPageReqVO;
import cn.csc.module.distribute.controller.admin.withdraw.vo.DistributeWithdrawUpdateReqVO;
import cn.csc.module.distribute.controller.app.withdraw.vo.AppDistributeWithdrawPageReqVO;
import cn.csc.module.distribute.controller.app.withdraw.vo.AppDistributeWithdrawReqVO;
import cn.csc.module.distribute.dal.dataobject.withdraw.DistributeWithdrawDO;

import javax.validation.Valid;
import java.math.BigInteger;
import java.util.Collection;
import java.util.List;

/**
 * 提现记录 Service 接口
 *
 * @author liuchuang
 */
public interface DistributeWithdrawService {

    /**
     * 创建提现记录
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    BigInteger createWithdraw(@Valid DistributeWithdrawCreateReqVO createReqVO);

    /**
     * 申请提现
     *
     * @param
     */
    BigInteger applyWithdraw(@Valid  AppDistributeWithdrawReqVO appDistributeWithdrawReqVO);

    /**
     * 更新提现记录
     *
     * @param updateReqVO 更新信息
     */
    void updateWithdraw(@Valid DistributeWithdrawUpdateReqVO updateReqVO);

    /**
     * 提现通过
     *
     * @param updateReqVO 更新信息
     */
    void applyUpdate(@Valid DistributeWithdrawUpdateReqVO updateReqVO);

    /**
     * 提现通过
     *
     * @param updateReqVO 更新信息
     */
    void applyAudit(@Valid DistributeWithdrawUpdateReqVO updateReqVO);

    /**
     * 删除提现记录
     *
     * @param id 编号
     */
    void deleteWithdraw(BigInteger id);

    /**
     * 获得提现记录
     *
     * @param id 编号
     * @return 提现记录
     */
    DistributeWithdrawDO getWithdraw(BigInteger id);

    /**
     * 获得提现记录列表
     *
     * @param ids 编号
     * @return 提现记录列表
     */
    List<DistributeWithdrawDO> getWithdrawList(Collection<BigInteger> ids);

    /**
     * 获得提现记录分页
     *
     * @param pageReqVO 分页查询
     * @return 提现记录分页
     */
    PageResult<DistributeWithdrawDO> getWithdrawPage(DistributeWithdrawPageReqVO pageReqVO);

    /**
     * 获得提现记录分页
     *
     * @param pageReqVO 分页查询
     * @return 提现记录分页
     */
    PageResult<DistributeWithdrawDO> getWithdrawCustomizePage(DistributeWithdrawPageReqVO pageReqVO);

    /**
     * 获得提现记录分页
     *
     * @param pageReqVO 分页查询
     * @return 提现记录分页
     */
    PageResult<DistributeWithdrawDO> getAppWithdrawPage(AppDistributeWithdrawPageReqVO pageReqVO);

    /**
     * 获得提现记录列表, 用于 Excel 导出
     *
     * @param exportReqVO 查询条件
     * @return 提现记录列表
     */
    List<DistributeWithdrawDO> getWithdrawList(DistributeWithdrawExportReqVO exportReqVO);

}
